package com.naiterui.ehp.bs.pharmacist.service;

import java.util.List;

import com.naiterui.ehp.bp.bo.esign.DigitalCertificateBO;
import com.naiterui.ehp.bp.bo.esign.EsignNoSecretBO;
import com.naiterui.ehp.bp.bo.esign.PreSignResultBO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.pharmacist.vo.esign.WillTypeVO;

/**
 * @Description TODO
 * @Author gongbaoqiang
 * @Date 2020/6/9 1:39 PM
 */
public interface IEsignUserService {

    /**
     * 获取实名认证验证码
     * @param doctorId
     * @throws BusinessException
     */
    void getRealnameCode(Long doctorId) throws BusinessException;

    /**
     * 实名认证
     * @param doctorId
     * @param code
     * @throws BusinessException
     */
    void checkRealnameCode(Long doctorId, String code) throws BusinessException;

    /**
     * 意愿签署列表
     * @return
     * @throws BusinessException
     */
    List<WillTypeVO> getWillTypes(Long pharmacistId) throws BusinessException;

    /**
     * 更新药师意愿签名方式
     * @param pharmacistId
     * @param willType
     * @throws BusinessException
     */
    void updateWillType(Long pharmacistId, String willType) throws BusinessException;

    /**
     * 更新签名密码
     * @param pharmacistId
     * @param passwd
     * @throws BusinessException
     */
    void updatePassword(Long pharmacistId, String passwd, String code) throws BusinessException;

    /**
     * 签名密码设置状态
     * @param pharmacistId
     * @return
     * @throws BusinessException
     */
    Boolean passwordStatus(Long pharmacistId) throws BusinessException;

    /**
     * 获取是否设置了免密
     * 
     * @param pharmacistId
     * @return
     * @throws BusinessException
     */
    EsignNoSecretBO getNoSecretByPharmacistId(Long pharmacistId) throws BusinessException;

    /***
     * 免签预签署
     *
     * @param pharmacistId
     * @return
     * @throws BusinessException
     */
    PreSignResultBO preNoSecret(Long pharmacistId) throws BusinessException;

    /**
     * 设置免密
     * 
     * @param pharmacistId
     * @param noSecret
     * @param authPwd
     * @param uniqueId
     * @throws BusinessException
     */
    void setNoSecret(Long pharmacistId, Boolean noSecret, String authPwd, String uniqueId) throws BusinessException;

    /**
     * 获取药师数字证书
     *
     * @param pharmacistId
     * @return
     * @throws BusinessException
     */
    DigitalCertificateBO getDigitalCertificate(Long pharmacistId) throws BusinessException;

    /**
     * 获取签名图片
     * 
     * @param pharmacistId
     * @return
     * @throws BusinessException
     */
    String signLicense(Long pharmacistId) throws BusinessException;
}
